import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_blue_plus_ohos/flutter_blue_plus_ohos.dart';
import 'package:flutter_blue_plus_ohos/flutter_blue_plus_ohos_platform_interface.dart';
import 'package:flutter_blue_plus_ohos/flutter_blue_plus_ohos_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockFlutterBluePlusOhosPlatform
    with MockPlatformInterfaceMixin
    implements FlutterBluePlusOhosPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final FlutterBluePlusOhosPlatform initialPlatform = FlutterBluePlusOhosPlatform.instance;

  test('$MethodChannelFlutterBluePlusOhos is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelFlutterBluePlusOhos>());
  });

  test('getPlatformVersion', () async {
    FlutterBluePlusOhos flutterBluePlusOhosPlugin = FlutterBluePlusOhos();
    MockFlutterBluePlusOhosPlatform fakePlatform = MockFlutterBluePlusOhosPlatform();
    FlutterBluePlusOhosPlatform.instance = fakePlatform;

    expect(await flutterBluePlusOhosPlugin.getPlatformVersion(), '42');
  });
}
